<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script>
        var count = 0

        function changeStatus() {
            ++count
            console.log(count)
            document.getElementById("img").style.visibility = count % 2 == 0 ? "visible" : "hidden"
            console.log(document.getElementById("img").style.visibility)
        }
    </script>
</head>
<body>
<div>
    <button onclick="changeStatus()">点击</button>
</div>
<div id="img" style="visibility:visible;">
    <img src="./1-2bluejpg.jpg" alt="" width="100%">
</div>
</body>
</html>
